package com.eqdd.yiqidian.ui.discover.gonggao;

import android.databinding.DataBindingUtil;

import com.eqdd.yiqidian.R;
import com.eqdd.yiqidian.base.BaseActivity;
import com.eqdd.yiqidian.RedPaperActivityCustom;
import com.eqdd.yiqidian.bean.rebuild.RedPaperBean;

import android.view.View;

import java.io.Serializable;

public class RedPaperActivity extends BaseActivity {
    private RedPaperActivityCustom dataBinding;
    private RedPaperBean redPaperBean;

    @Override
    public void initBinding() {
        dataBinding = DataBindingUtil.setContentView(this, R.layout.activity_red_paper);
        redPaperBean = (RedPaperBean) getIntent().getSerializableExtra("bean");
        initTopTitleBar(View.VISIBLE, redPaperBean.getTitle());
    }

    @Override
    public void initData() {
    }

    @Override
    public void setView() {
        dataBinding.tvTitle.setText(redPaperBean.getPaperTitle());
        dataBinding.tvContent.setText("\t\t"+redPaperBean.getContent());
        dataBinding.tvTheme.setText(redPaperBean.getTheme());
        dataBinding.tvDate.setText(redPaperBean.getDate());
        dataBinding.tvInfo.setText(String.format("%s发 [%s] %s", redPaperBean.getPublisher(), redPaperBean.getYear(), redPaperBean.getCode()));
    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()) {

        }
    }
}
